﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="role_load_manager.aspx.cs" Inherits="SQT.tracnghiem.Ajax.ASP.Staff.role_load_manager" %>
<%@ Import Namespace="DataAccess" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<body>
    <%var get_role = new TblManagerRoleController().FetchAll();  
         %>
    <header class="w3-padding w3-center"><b>Danh sách nhân viên</b></header>
    <div class="w3-padding">
        <ul class="ss-author-list w3-border-right ss-checkbox">
            <%foreach(TblManagerRole role in get_role) {
                    var get_manager = new TblManagerController().FetchAll().Where(x => x.Role == role.RoleId && x.Active == true);
                    if (get_manager.ToList().Count == 0)
                        continue;
                    %>
            <li>
                <a class="ss-author-list-item">
                    <input class="ss-check-room" <%if (check_full_acceot(role.RoleId, accept))
                        {%>checked="checked"<%} %> type="checkbox" id="pq-<%=role.RoleId %>" /><label for="pq-<%=role.RoleId %>" class="ss-check"></label><i onclick="ss_open_author_list(this)" class="ss-show-member-btn fa fa-caret-right w3-large"></i><i class="ss-author-icon fa fa-users"></i><label><%=role.RoleName %></label>
                </a>
                <ul class="ss-author-list ss-author-member-list">
                    <%foreach (TblManager manager in get_manager)
                        { %>
                    <li><a>
                        <input <%if (check_accept(manager.ManagerId, this.accept))
                            {%>checked="checked"<%} %> class="ss-check-member" value="<%=manager.ManagerId %>" type="checkbox" id="manager-<%=manager.ManagerId %>" /><label for="manager-<%=manager.ManagerId %>" class="ss-check"></label><i class="fa fa-user"></i><span><%=manager.FullName %></span></a></li>
                    <%} %>
                </ul>
            </li>
            <%} %>
        </ul>
    </div>
    <div onclick="btn_check_role(<%=id %>)" class="w3-padding-4 w3-center"><a class="w3-btn w3-teal"><i class="fa fa-check"></i>&nbsp;Xác nhận</a></div>

</body>
</html>
